home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gxfont0.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  2.6 KB  |  81 lines

  1. /* Copyright (C) 1994, 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gxfont0.h,v 1.3 2000/09/19 19:00:37 lpd Exp $ */
  20. /* Type 0 (composite) font data definition */
  21.  
  22. #ifndef gxfont0_INCLUDED
  23. #  define gxfont0_INCLUDED
  24.  
  25. /* Define the composite font mapping types. */
  26. /* These numbers must be the same as the values of FMapType */
  27. /* in type 0 font dictionaries. */
  28. typedef enum {
  29.     fmap_8_8 = 2,
  30.     fmap_escape = 3,
  31.     fmap_1_7 = 4,
  32.     fmap_9_7 = 5,
  33.     fmap_SubsVector = 6,
  34.     fmap_double_escape = 7,
  35.     fmap_shift = 8,
  36.     fmap_CMap = 9
  37. } fmap_type;
  38.  
  39. #define fmap_type_min 2
  40. #define fmap_type_max 9
  41. #define fmap_type_is_modal(fmt)\
  42.   ((fmt) == fmap_escape || (fmt) == fmap_double_escape || (fmt) == fmap_shift)
  43.  
  44. /* This is the type-specific information for a type 0 (composite) gs_font. */
  45. #ifndef gs_cmap_DEFINED
  46. #  define gs_cmap_DEFINED
  47. typedef struct gs_cmap_s gs_cmap_t;
  48. #endif
  49. typedef struct gs_type0_data_s {
  50.     fmap_type FMapType;
  51.     byte EscChar, ShiftIn, ShiftOut;
  52.     gs_const_string SubsVector;    /* fmap_SubsVector only */
  53.     uint subs_size;        /* bytes per entry */
  54.     uint subs_width;        /* # of entries */
  55.     uint *Encoding;
  56.     uint encoding_size;
  57.     gs_font **FDepVector;
  58.     uint fdep_size;
  59.     const gs_cmap_t *CMap;    /* fmap_CMap only */
  60. } gs_type0_data;
  61.  
  62. #define gs_type0_data_max_ptrs 3
  63.  
  64. typedef struct gs_font_type0_s {
  65.     gs_font_common;
  66.     gs_type0_data data;
  67. } gs_font_type0;
  68.  
  69. extern_st(st_gs_font_type0);
  70. #define public_st_gs_font_type0()    /* in gsfont0.c */\
  71.   gs_public_st_complex_only(st_gs_font_type0, gs_font_type0, "gs_font_type0",\
  72.     0, font_type0_enum_ptrs, font_type0_reloc_ptrs, gs_font_finalize)
  73.  
  74. /* Define the Type 0 font procedures. */
  75. font_proc_define_font(gs_type0_define_font);
  76. font_proc_make_font(gs_type0_make_font);
  77. font_proc_init_fstack(gs_type0_init_fstack);
  78. font_proc_next_char_glyph(gs_type0_next_char_glyph);
  79.  
  80. #endif /* gxfont0_INCLUDED */
  81.